<template>
  <div class="box1">
    <!-- <p class="head">任务审核</p> -->
<div>
  <input class="goLast" type="button" value="<   返回上页" @click="golast">
  <span style="font-size:20px"><b>任务审核</b></span>
</div>


    <hr style="color:rgb(197, 196, 196)">
    
    <div class="formbd1">
      <el-form ref="form" :model="sizeForm" label-width="150px" size="small">
        <el-form-item label="任务标题">
          <el-input v-model="sizeForm.name"></el-input>
        </el-form-item>
        <el-form-item label="任务类型">
        <p>单人任务</p>
        </el-form-item>
        <el-form-item label="任务奖励">
          <el-input v-model="sizeForm.date1"></el-input>
        </el-form-item>
        <el-form-item label="任务截止时间">
          <el-input v-model="sizeForm.date2"></el-input>
        </el-form-item>
        <el-form-item label="任务级别">
          <el-input v-model="sizeForm.resource"></el-input>
        </el-form-item>
      </el-form>
    </div>
    <div class="formbd2">
      <el-form ref="form" :model="sizeForm" label-width="150px" size="small">
        <el-form-item label="任务描述">
          <el-input
            type="textarea"
            :rows="3"
            style="width: 700px"
            v-model="sizeForm.desc"
          ></el-input>
        </el-form-item>
        <el-form-item label="任务要求">
          <el-input
            type="textarea"
            :rows="3"
            style="width: 700px"
            v-model="sizeForm.desc1"
          ></el-input>
        </el-form-item>

        <div>
          <el-form-item class="btn4">
            
            <el-button type="primary" @click="gogl"
              >通过任务</el-button
            >
            <el-button>驳回</el-button>
          </el-form-item>
        </div>
      </el-form>
    </div>
    <!-- +++++++++++++++++++++++++++上传++++++++++++++++++++++++++++++++ -->
    <div class="update">
        <el-upload
          class="upload-demo"
          action="https://jsonplaceholder.typicode.com/posts/"
          :on-preview="handlePreview"
          :on-remove="handleRemove"
          :before-remove="beforeRemove"
          multiple
          :limit="3"
          :on-exceed="handleExceed"
          :file-list="fileList">
          <el-button size="small" type="primary">点击上传</el-button>
          <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
        </el-upload>
    </div>
  </div>
</template>
<style>
.box1 {
  width: 1250px;
  height: 660px;
  background-color: white;
  /* padding-top: 50px; */
}
.head {
  float: left;
 
}
.formbd1 {
  width: 700px;
  /* border: red solid 1px; */
  position: absolute;
  top: 150px;
  /* margin-left: 30px; */
}
.formbd2 {
  width: 1200px;
  /* border: red solid 1px; */
  position: absolute;
  top: 405px;
  /* margin-left: 30px; */
}
.btn4{
   margin-top: 120px;
   margin-left:900px;
}
.update{
 position: absolute;
 top: 590px;
 left: 370px;
}
.goLast{
  width: 150px;
  height: 50px;
  /* border: red solid 1px; */
  /* margin-left: 12px; */
  background-color: white;
  color: rgb(164, 161, 161);
  font-size: 13px;
}

</style>

<script>
export default {
  data() {
    return {
      fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}],
      
      sizeForm: {
         
        name: "",
         radio: '1',
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        desc1: "",
      },
    };
  },
  methods: {
    golast(){
      this.$router.go(-1);
    },
    gogl(){
         this.$router.push('/rwgl');
    },
    handleRemove(file, fileList) {
        console.log(file, fileList);
      },
      handlePreview(file) {
        console.log(file);
      },
      handleExceed(files, fileList) {
        this.$message.warning(`当前限制选择 3 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`);
      },
      beforeRemove(file, fileList) {
        return this.$confirm(`确定移除 ${ file.name }？`);
      }
  },
};
</script>